<template>
    <div class="box">
        <header class="tou">
            <van-nav-bar title="订单" left-arrow @click-left="$router.go(-1)" />
        </header>
        <main class="zhong">
            <van-cell title="北京昌平区" is-link label="张三 12345678989" @click="$router.push('/label')"/>
            <!-- {{ store.cartList }} -->
            <van-empty v-if="store.cartList.length==0" image="https://fastly.jsdelivr.net/npm/@vant/assets/custom-empty-image.png" image-size="80"
                description="订单什么也没有" />
            <van-swipe-cell v-else v-for="item in store.cartList" :key="item.id">
                <van-card :num="item.count" :price="item.price" :title="item.title" :thumb="item.image" />
            </van-swipe-cell>
        </main>
    </div>
    <ffoter class="di">
        <van-submit-bar :price="store.totalPrice*100" button-text="提交订单" @submit="onSubmit" />
    </ffoter>
</template>
<script setup>
import { useCounterStore } from '@/stores/counter'
const store = useCounterStore()
</script>